module cp2001 (ADDR, DINPUT, DOUTPUT, nWE, nRD, nRESET, CLK, nCS, nIDLE);

input [1:0] ADDR;
input [7:0] DINPUT;
output [7:0] DOUTPUT;
input nWE, nRD, nCS, nRESET, CLK;
output nIDLE;

wire [1:0] ADDR;
wire [7:0] DINPUT;
wire [7:0] DOUTPUT;
wire nWE, nRD, nCS, nRESET, CLK;
wire nIDLE;

wire nResetFromDecoder, nResetToCordicCore;
wire SELMUXEXTREGX, SELMUXEXTREGY, SELMUXEXTREGZ;
wire [1:0] SELMUXREGEXT;
wire ENX, ENY, ENZ, nCTRHOLD, ApproxMode;
wire [1:0] CoordMode;
wire [7:0] DataToCordicCore, DataFromCordicCore;

and RESETLOGIC (nResetToCordicCore, nResetFromDecoder, nRESET);

ucordic8decoder DECODER (.ADDR(ADDR), .DME(DINPUT), .DEM(DOUTPUT), .nRD(nRD), .nWE(nWE), .nCS(nCS), .nIDLE(nIDLE), .nRESET(nRESET), .CLK(CLK), .SELMUXEXTREGX(SELMUXEXTREGX), .SELMUXEXTREGY(SELMUXEXTREGY), .SELMUXEXTREGZ(SELMUXEXTREGZ), .SELMUXREGEXT(SELMUXREGEXT), .ENX(ENX), .ENY(ENY), .ENZ(ENZ), .nCTRHOLD(nCTRHOLD), .ApproxMode(ApproxMode), .CoordMode(CoordMode), .DataToCordicCore(DataToCordicCore), .DataFromCordicCore(DataFromCordicCore), .nResetToCordicCore(nResetFromDecoder));

ucordic8 UCORDIC8CORE (.CLK(CLK), .nRESET(nResetToCordicCore), .EXTDataIn(DataToCordicCore), .EXTDataOut(DataFromCordicCore), .SELMUXEXTREGX(SELMUXEXTREGX), .SELMUXEXTREGY(SELMUXEXTREGY), .SELMUXEXTREGZ(SELMUXEXTREGZ), .SELMUXREGEXT(SELMUXREGEXT), .ENX(ENX), .ENY(ENY), .ENZ(ENZ), .ApproxMode(ApproxMode), .CoordMode(CoordMode), .nCTRHOLD(nCTRHOLD));

endmodule